package nave.control;

import nave.Constants;


public class Options {

	/*
	 * Constants
	 */
	public final static int EASY = 0;
	public final static int MEDIUM = 1;
	public final static int HARD = 2;
	
	/*
	 * Attributes
	 */
	private static int lives = 3;
	private static int difficulty = MEDIUM;	
	private static boolean sound = true; // TODO maybe not necessary

	private static int numberOfPlayerBullets = 2;
	private static int numberOfEnemiesBullets = 1;
	private static int numberOfEnemies = 2;

	/*
	 * Setters and Getters
	 */
	public static int getNumberOfPlayerBullets() {
		return numberOfPlayerBullets;
	}
	public static int getNumberOfEnemiesBullets() {
		return numberOfEnemiesBullets;
	}

	public static boolean sound() {
		return sound;
	}
	public static void invertSound() {
		Options.sound = ( sound ? false : true );
	}
	
	public static int getLives() {
		return lives;
	}
	public static void setLives(int lives) {
		Options.lives = lives;
	}

	public static int getNumberOfEnemies() {
		return numberOfEnemies;
	}

	public static int getDifficulty() {
		return difficulty;
	}
	public static void setDifficulty(int temp) {
		// TODO Auto-generated method stub
		switch (temp) {
		case EASY:
			difficulty = EASY;
			numberOfEnemies = 2;
			numberOfPlayerBullets = 3;
			numberOfEnemiesBullets = 1;
			Constants.POINTS_ENEMY_DIED = 5;
			Constants.POINTS_PLAYER_DIED = -5;
			Constants.POINTS_NEXT_STAGE = 20;
			break;
		case MEDIUM:
			difficulty = MEDIUM;
			numberOfEnemies = 3;
			numberOfPlayerBullets = 2;
			numberOfEnemiesBullets = 1;
			Constants.POINTS_ENEMY_DIED = 10;
			Constants.POINTS_PLAYER_DIED = -5;
			Constants.POINTS_NEXT_STAGE = 50;
			break;
		case HARD:
			difficulty = HARD;
			numberOfEnemies = 5;
			numberOfPlayerBullets = 1;
			numberOfEnemiesBullets = 2;
			Constants.POINTS_ENEMY_DIED = 10;
			Constants.POINTS_PLAYER_DIED = -10;
			Constants.POINTS_NEXT_STAGE = 70;
			break;
		}
	}
}
